﻿namespace DoxyOutParser
{
	using System.Diagnostics;

	internal class DoxygenLauncher
	{
		private DoxygenLauncher()
		{
		}

		public static void Launch(string doxyfileName, string doxyfilePath, string doxygenBinary)
		{
			ProcessStartInfo startInfo = new ProcessStartInfo();

			startInfo.FileName = doxygenBinary;
			startInfo.WorkingDirectory = doxyfilePath;
			startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
			startInfo.UseShellExecute = false;
			startInfo.CreateNoWindow = false;
			startInfo.Arguments = doxyfileName;

			try
			{
				Process listFiles = Process.Start(startInfo);

				while (!listFiles.HasExited)
				{
				}
			}
			catch
			{
				throw;
			}
		}
	}
}
